package com.user.dao;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import com.user.entity.Department;
@Repository
public interface DepartmentRepository extends PagingAndSortingRepository<Department, Long>, JpaSpecificationExecutor<Department> {
	@Query(value="from Department d where d.name = ?1")
	public Department findByName(String name);
	@Query(value="from Department d where d.num=?1")
	public Department findByNum(String num);
}
